package com.shumi.rbac.service;


import com.shumi.rbac.mapper.SzspccMapper;
import com.shumi.rbac.model.SzspccInfo;
import com.shumi.rbac.model.SzspccPageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly=true)
public class SzspccService {

	@Autowired
	private SzspccMapper szspccMapper;

	public List<SzspccInfo> queryAll(SzspccPageInfo all) {
		all.setPageNo((all.getPageNo() - 1) * all.getPageSize());
		return szspccMapper.queryAll(all);

	}

	public int queryCount() {
		return szspccMapper.queryCount();
	}

}
